#!/usr/bin/python3

import sys
import dep_graph.pickled_database

fname = sys.argv[1]
print('Dumping', fname, '\n')
#"bin/__graph__/newgraph.db"
graph = dep_graph.pickled_database.PickledDatabase(fname)

for key in graph.keys():
  obj = graph.lookup(key)
  if hasattr(obj, "deep_inspect"):
    obj = obj.deep_inspect()
  print(repr(key) + " => " + repr(obj))
